<?php
	/**
	 * @package AmpleHarvest
	 */
	namespace ampleharvest\code\usermanager\tables;
	
	use\ampleharvest\permissions;
	use\ampleharvest\code;

	require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config/cConfig.php';
	require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config/cPermissions.php';

	$config = new \ampleharvest\code\cConfig();
	require_once $config->C_STR_USER_MANAGER_PATH . "/Classes/cTABLE_Groups.php";
	/**
	 * @brief Adds new actions to the Actions Table in the User Manager database
	 *
	 * - Revision History
	 *  - 0.1
	 * 	 - <b>Date</b>: 11 APR 2011
	 * 	 - <b>Author</b>: Randy Blancett
	 * 	  - Initial Version
	 *
	 * @author Randy Blancett
	 * @version 0.1
	 * @ingroup code classes table  user_manager
	 */
	class cTABLE_Groups extends \cTABLE_Groups
	{
		const C_STR_GROUP_HARVEST_MANAGER = "F1D8A48E-884C-40B1-8572-40658ACE062A";
		const C_STR_GROUP_DATA_MANAGER = "C2DB2D11-964B-4D45-B7FA-9B38FDE7DAE4";
		const C_STR_GROUP_AH_ADMIN = "989E7AF5-45B1-4389-9BDC-E067EDBBEFBC";
		const C_STR_GROUP_AH_GROUP_ADMIN = "23C2CFA4-12E6-4D7B-81FB-92384B4D2E61";
		/**
		 * Inserts default information into the table this adds required information 
		 * that is needed for AmpleHarvest to function.
		 */
		public function insert_DefaultData()
		{
			$this->clear();
			$this->set_ID(self::C_STR_GROUP_HARVEST_MANAGER);
			$this->set_Name("Harvest Manager");
			$this->set_Comment("Individuals who handle the harvest requests.");

			$this->save_Data2DB();
			
			$this->clear();
			$this->set_ID(self::C_STR_GROUP_DATA_MANAGER);
			$this->set_Name("Data Manager");
			$this->set_Comment("Individuals who manage the data in AmpleHarvest.");

			$this->save_Data2DB();
			
			$this->clear();
			$this->set_ID(self::C_STR_GROUP_AH_ADMIN);
			$this->set_Name("AmpleHarvest Admin");
			$this->set_Comment("Individuals administer AmpleHarvest.");

			$this->save_Data2DB();
			
			$this->clear();
			$this->set_ID(self::C_STR_GROUP_AH_GROUP_ADMIN);
			$this->set_Name("AmpleHarvest Group Admin");
			$this->set_Comment("Individuals administer AmpleHarvest groups.");

			$this->save_Data2DB();
			return true;
		}
	}
?>
